//
//  ByBetRecordTitleView.m
//  caipiao_ios
//
//  Created by mc on 2018/8/13.
//  Copyright © 2018年 ZhangZhanbin. All rights reserved.
//

#import "ByBetRecordTitleView.h"



@implementation ByBetRecordTitleView

- (id)init{
    self = [super init];
    if (self) {
        
        self.backgroundColor = [UIColor whiteColor];
        UILabel *line = [[UILabel alloc] init];
        [self addSubview:line];
        [line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(8);
            make.centerY.equalTo(self).offset(0);
            make.size.mas_equalTo(CGSizeMake(2, 13));
        }];
        line.backgroundColor = BY_THEME_COLOR;
        
        
        UILabel *titleLabel = [[UILabel alloc] init];
        [self addSubview:titleLabel];
        [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self).offset(0);
            make.left.equalTo(line.mas_right).offset(5);
            make.right.equalTo(self).offset(-150);
            make.height.mas_equalTo(@15);
        }];
        titleLabel.font = FONT(13);
        titleLabel.textColor = [UIColor blackColor];
        self.titleLabel = titleLabel;
        
        
        ByDottedLineView *dottedLine = [[ByDottedLineView alloc] init];
        dottedLine.direction = DottedLineViewDirectionHorizontalFromRight;
        dottedLine.lineColor = BY_LINE_COLOR;
        dottedLine.lengthPattern = @[@4, @3];
        [self addSubview:dottedLine];
        [dottedLine mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(0);
            make.right.equalTo(self).offset(0);
            make.bottom.equalTo(self).offset(0);
            make.height.mas_equalTo(@1);
        }];
        self.dottedLine = dottedLine;
        
        
    }
    return self;
}

@end
